import Vue from 'vue';
import Vonic from 'vonic';

import login from '../pages/login/login.vue';
import resetPassword from '../pages/resetPassword/resetPassword.vue';
import store from '../pages/store/store.vue';
import index from '../pages/index/index.vue';

// components
import vipStatistics from '../pages/index/components/vipStatistics/vipStatistics.vue';
import Statement from '../pages/index/components/statement/statement.vue';
import electronBill from '../pages/index/components/electronBill/electronBill.vue';
import storeBill from '../pages/index/components/storeBill/storeBill.vue';
import rateData from '../pages/index/components/rateData/rateData.vue';
import changeWork from '../pages/index/components/changeWork/changeWork.vue';
import workDetail from '../pages/index/components/changeWork/workDetail/workDetail.vue';
import saleStatic from '../pages/index/components/saleStatic/saleStatic.vue';
import ringReport from '../pages/index/components/ringReport/ringReport.vue';
import stockDetail from '../pages/index/components/stockDetail/stockDetail.vue';
import manageBill from '../pages/index/components/manageBill/manageBill.vue';//经营日报
import salesHot from '../pages/index/components/salesHot/salesHot.vue';//交易趋势
import stockUpDown from '../pages/index/components/stockUpDown/stockUpDown.vue';
import barUpDown from '../pages/index/components/barUpDown/barUpDown.vue';
import siteData from '../pages/index/components/siteData/siteData.vue';
import bigScreenGoods from '../pages/index/components/bigScreenGoods/index.vue';


var routes = [
    {
        //重定向
        path: '/',
        redirect: '/index'
    },
    {
        path: '/login',
        name: 'login',
        component: login
    },
    {
        path: '/resetPassword',
        name: 'resetPassword',
        component: resetPassword
    },
    {
        path: '/store',
        name: 'store',
        component: store
    },
    {
        path: '/index',
        name: 'index',
        component: index,
        children: [
            {
                //重定向
                path: '/index',
                // redirect: '/index/vipStatistics'
                // redirect: '/index/rateData'
                redirect: '/index/siteData'
            },
            {
                path: '/index/bigScreenGoods',
                name: 'bigScreenGoods',
                component: bigScreenGoods
            },
            // test siteData
            {
                path: '/index/siteData',
                name: 'siteData',
                component: siteData
            },
            // 
            {
                path: '/index/vipStatistics',
                name: 'vipStatistics',
                component: vipStatistics
            },
            {
                path: '/index/statement',
                name: 'statement',
                component: Statement
            },
            {
                path: '/index/electronBill',
                name: 'electronBill',
                component: electronBill
            },
            {
                path: '/index/changeWork',
                name: 'changeWork',
                component: changeWork,
                children:[{
                    path: '/index/changeWork/workDetail',
                    name: 'workDetail',
                    component: workDetail
                }]
            },
            {
                path: '/index/saleStatic',
                name: 'saleStatic',
                component: saleStatic
            },
            {
                path: '/index/ringReport',
                name: 'ringReport',
                component: ringReport
            },
            {
                path: '/index/stockDetail',
                name: 'stockDetail',
                component: stockDetail
            },
            {
                path: '/index/stockUpDown',
                name: 'stockUpDown',
                component: stockUpDown
            },
            {
                path: '/index/barUpDown',
                name: 'barUpDown',
                component: barUpDown
            },
            {
                path: '/index/storeBill',
                name: 'storeBill',
                component: storeBill
            },
            {
                path: '/index/rateData',
                name: 'rateData',
                component: rateData
            },
            {
                path: '/index/manageBill',
                name: 'manageBill',
                component: manageBill
            },
            {
                path: '/index/salesHot',
                name: 'salesHot',
                component: salesHot
            }
        ]
    },
]

export default routes;
